package com.atguigu03.field_method.field.exer2;

/**
 * ClassName: EmployeeTest
 * Description:
 *
 * @Author liu
 * @Create 2024/8/18 14:30
 * @Version 1.0
 */

public class EmployeeTest {
    public static void main(String[] args) {
        //在EmployeeTest测试类中的main()中，
        // 创建两个员工对象，并为他们的姓名和生日赋值，并显示
        Employee p1 = new Employee();

        p1.id = 1002;
        p1.name = "lucy";
        p1.age = 20;
        //因为birthday是MyDate类，所以在调用时要再重新，还要再定义一遍
        p1.birthday  = new MyDate();
        p1.birthday.year =2011;
        p1.birthday.month = 6 ;
        p1.birthday.day = 20 ;

        System.out.println("id = " + p1.id + ",name = " + p1.name +
                ", age = " + p1.age + ", salary = " + p1.salary +
                ", birthday = [" + p1.birthday.year + "年" + p1.birthday.month +
                "月" + p1.birthday.day + "日]");

    }
}
